package com.cc.cbdb.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class QBiogCustom implements Parcelable {
	private Integer personId;
	private String name;
	private String nameChn;
	private String dyChn;
	private String altName;
	private Integer addrType;
	private String addrDescChn;
	private Integer addrId;
	private String addrNameChn;
	private String notes;

	protected QBiogCustom(Parcel in) {
		if (in.readByte() == 0) {
			personId = null;
		} else {
			personId = in.readInt();
		}
		name = in.readString();
		nameChn = in.readString();
		dyChn = in.readString();
		altName = in.readString();
		if (in.readByte() == 0) {
			addrType = null;
		} else {
			addrType = in.readInt();
		}
		addrDescChn = in.readString();
		if (in.readByte() == 0) {
			addrId = null;
		} else {
			addrId = in.readInt();
		}
		addrNameChn = in.readString();
		notes = in.readString();
	}

	public static final Creator<QBiogCustom> CREATOR = new Creator<QBiogCustom>() {
		@Override
		public QBiogCustom createFromParcel(Parcel in) {
			return new QBiogCustom(in);
		}

		@Override
		public QBiogCustom[] newArray(int size) {
			return new QBiogCustom[size];
		}
	};

	public Integer getPersonId() {
		return personId;
	}
	public void setPersonId(Integer personId) {
		this.personId = personId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getNameChn() {
		return nameChn;
	}
	public void setNameChn(String nameChn) {
		this.nameChn = nameChn;
	}
	public String getDyChn() {
		return dyChn;
	}
	public void setDyChn(String dyChn) {
		this.dyChn = dyChn;
	}
	public String getAltName() {
		return altName;
	}
	public void setAltName(String altName) {
		this.altName = altName;
	}
	public Integer getAddrType() {
		return addrType;
	}
	public void setAddrType(Integer addrType) {
		this.addrType = addrType;
	}
	public String getAddrDescChn() {
		return addrDescChn;
	}
	public void setAddrDescChn(String addrDescChn) {
		this.addrDescChn = addrDescChn;
	}
	public Integer getAddrId() {
		return addrId;
	}
	public void setAddrId(Integer addrId) {
		this.addrId = addrId;
	}
	public String getAddrNameChn() {
		return addrNameChn;
	}
	public void setAddrNameChn(String addrNameChn) {
		this.addrNameChn = addrNameChn;
	}
	public String getNotes() {
		return notes;
	}
	public void setNotes(String notes) {
		this.notes = notes;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel parcel, int i) {
		if (personId == null) {
			parcel.writeByte((byte) 0);
		} else {
			parcel.writeByte((byte) 1);
			parcel.writeInt(personId);
		}
		parcel.writeString(name);
		parcel.writeString(nameChn);
		parcel.writeString(dyChn);
		parcel.writeString(altName);
		if (addrType == null) {
			parcel.writeByte((byte) 0);
		} else {
			parcel.writeByte((byte) 1);
			parcel.writeInt(addrType);
		}
		parcel.writeString(addrDescChn);
		if (addrId == null) {
			parcel.writeByte((byte) 0);
		} else {
			parcel.writeByte((byte) 1);
			parcel.writeInt(addrId);
		}
		parcel.writeString(addrNameChn);
		parcel.writeString(notes);
	}
}
